<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%@ page language="java" contentType="text/html;charset=utf-8"%>
<%@ include file="/pub/siteinclud.jsp"%>
<html>
<head>
<title>注册会员-企助网</title>
<style type="text/css">
<!--
body {margin: 20px}
.cgray{ font-size:12px; color:#999; text-decoration:none;}
.cgray:hover{ text-decoration:underline;}
.cblue{ color:#1c5398;}
.box{ width:450px; height:160px; border:1px solid #e4e4e4; background:#fafafa; padding:5px;}
.box b{ font-size:16px; color:#000; }

.register{ color:#999; font-size:12px; margin-top:20px; text-align:center}
.xiy {width:380px; background:#f1f1f1; border:1px solid #ccc; padding:8px; display:inline-block}
-->
</style>
<script type="text/javascript">
	$(document).ready(function(){
        $.formValidator.initConfig({formid:"submitForm1"});
        
        
		$("#login_name").formValidator({onfocus:"用户名至少4个字符,最多20个字符",oncorrect:"该用户名可以注册"}).inputValidator({min:4,max:20,onerror:"你输入的用户名非法,请确认"}).regexValidator({regexp:"^([a-zA-Z0-9]*)$",onerror:"用户名只能由英文字母和数字组成"})
		    .ajaxValidator({
		    type : "get",
			url : "<%=path%>/ext/site_user/vlgname",
			datatype : "html",
			success : function(data){
	            if( data == "success" )
				{
	                return true;
				}
	            else
				{
	                return false;
				}
			},
			onerror : "该用户名已注册不可用，请更换用户名",
			onwait : "正在对用户名进行合法性校验，请稍候..."
		});
			
		$("#email").formValidator({onshow:"请输入邮箱",onfocus:"邮箱6-100个字符,邮箱请仔细填写",oncorrect:"恭喜你,你输对了"}).inputValidator({min:6,max:100,onerror:"你输入的邮箱长度非法,请确认"}).regexValidator({regexp:"^([\\w-.]+)@(([[0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3}.)|(([\\w-]+.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(]?)$",onerror:"你输入的邮箱格式不正确"});
        $("#password").formValidator({onshow:"请输入密码",onfocus:"密码不能为空",oncorrect:"密码合法"}).inputValidator({min:1,empty:{leftempty:false,rightempty:false,emptyerror:"密码两边不能有空符号"},onerror:"密码不能为空,请确认"});
		$("#cpassword").formValidator({onshow:"请输入重复密码",onfocus:"两次密码必须一致哦",oncorrect:"密码一致"}).inputValidator({min:1,empty:{leftempty:false,rightempty:false,emptyerror:"重复密码两边不能有空符号"},onerror:"重复密码不能为空,请确认"}).compareValidator({desid:"password",operateor:"=",onerror:"2次密码不一致,请确认"});
		$("#mobile").formValidator().inputValidator({min:11,max:11,onerror:"手机号码必须是11位的,请确认"}).regexValidator({regexp:"^[1][0-9]{10}$",onerror:"你输入的手机号码格式不正确"});;
		$("#name").formValidator({onshow:"请输入您的真实姓名",onfocus:"姓名是由2-5个汉字组成，请仔细填写",oncorrect:"恭喜你,你输对了"}).inputValidator({min:4,onerror:"姓名是由2-5个汉字组成，请仔细填写"}).inputValidator({max:15,onerror:"姓名过长"});
        //$("input:checkbox[@name='chkagreement']").formValidator({tipid:"chkagreementTip",onshow:"请选择你的兴趣爱好（至少选一个）",onfocus:"你至少选择1个",oncorrect:"恭喜你,你选对了"}).inputValidator({min:1,onerror:"你选的个数不对"});
		
    });
    var save = function(){
			var flag = "failure";
			if($.formValidator.pageIsValid()){
				var options = {
					type: 'POST',
					async: false,
					dataType: 'content-type',
					success: function(msg) {
						flag = msg;
					}
				}
				$('#submitForm1').ajaxSubmit(options);
			}
			return flag;
		}
</script>
</head>
<body>
<form id="submitForm1" action="<%=path%>/ext/site_user/save" style="" method="post" name="submitForm1" >
	<input type="hidden" name="site_id" value="000000020012e664bc4c8"/>
	<div class="box">
			<table class="table_register" style="">
				<tr>
					<td>
						用&nbsp;&nbsp;户&nbsp;&nbsp;名：
					</td>
					<td>
						<input type="text" size="20" value="" class="inp inw" id="login_name" maxlength="20" name="login_name"  style="width:168px"  />
					</td>
					<td>
						<div id="login_nameTip"></div> 
					</td>
				</tr>
				<tr>
					<td>
						电子邮箱：
					</td>
					<td>
						<input type="text" size="20" value="" class="inp inw" id="email" name="email" style="width:168px" />
					</td>
					<td>
						<div id="emailTip"></div> 
					</td>
				</tr>
				<tr>
					<td>
						密&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;码：
					</td>
					<td>
						<input type="password" size="30" name="password" id="password" class="inp inw" maxlength="16"  />
					</td>
					<td>
						<div id="passwordTip"></div> 
					</td>
				</tr>
				<tr>
					<td>
						确认密码：
					</td>
					<td>
						<input type="password" size="30" name="cpassword" id="cpassword" class="inp inw" maxlength="16"  />
					</td>
					<td>
						<div id="cpasswordTip"></div> 
					</td>
				</tr>
				<tr>
					<td>
						真实姓名：
					</td>
					<td>
						<input class="inp inw"  style="width:168px" type="text" id="name" name="name"  maxlength="16" />
					</td>
					<td>
						<div id="nameTip"></div> 
					</td>
				</tr>
				<tr>
					<td>
						手机号码：
					</td>
					<td>
						<input class="inp inw"  style="width:168px" type="text" id="mobile" name="mobile"  maxlength="16" />
					</td>
					<td>
						<div id="mobileTip"></div> 
					</td>
				</tr>
			</table>
			<br/>
	
	<p style="height:10px"/>	
	</div>
</form>
</body>
</html>





